package com.wakaca.design.pattern.behavioral.visitor;

/**
 * Created by wakac on 2019/4/4
 */
public class Visitor implements IVisitor{

    public void visit(FreeCourse freeCourse) {
        System.out.println("免费课程："+freeCourse.getName());
    }

    public void visit(CodingCourse codingCourse) {
        System.out.println("代码课程："+codingCourse.getName()+" 价格 "+codingCourse.getPrice());
    }
}
